import axios from '../../axios'
//一级路径
const ORDER_URL = '/order'

const orderApi = {
    //新增订单
    addOrder(data){
        console.log('API',data);
        return axios({
            url: ORDER_URL+'/addOrder',
            method:'post',
            data
        })
    },
    //搜索订单列表
    getOrderList(data){
        return axios({
            url: ORDER_URL+'/findAllOrder',
            method:'post',
            data
        })
    },
    //通过id查找订单
    findOrderByID(data){
        return axios({
            url: ORDER_URL+'/findOrderByID',
            method:'post',
            data
        })
    },
    //获取订单信息
    getOrder(data){
        return axios({
            url: ORDER_URL+'/findOrder',
            method:'post',
            data
        })
    },
    // 修改订单状态
    changeOrderStatus(data){
        console.log('api',data);
        return axios({
            url: ORDER_URL+'/changeOrderStatus',
            method:'post',
            data
        })
    }

    
}

export default orderApi